Skip to content

feat: prepare 0.1.0 local AI coding-session drift and repair loop - #6

Merged
melampus-admin merged 6 commits into
mainfrom
feat/first-release
Sep 29, 2026
Merged

melampus-admin merged 6 commits into
mainfrom
feat/first-release

Conversation

@melampus-admin

@melampus-admin melampus-admin commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What and why

AI coding agents can keep generating code after its behavior has diverged from the requested intent. This prepares the 0.1.0 alpha around a local generation → execution evidence → repair loop.

An owner reviews SDK Contract objects and a small executable scenario. The agent imports those contracts while implementing the required functions. A dedicated melampus session process detects source changes, executes each revision in a fresh interpreter, and evaluates every required check. Synchronous Claude Code hooks restrict progression and completion on drift/incomplete evidence, while allowing reads and scoped Edit/Write repairs. Fresh healthy evidence reopens the gate.

For example, changing the sample pricing function to return its input produces nonnegative/cap findings; the next Bash action and Stop are blocked. Restoring the implementation permits completion. Removing instrumentation, substituting predicates, skipping targets, changing reviewed files, hanging, crashing, or losing the supervisor cannot count as success.

Included in this release

  • API-only instrumentation plus reusable reviewed Contract objects; sync/async support and hash-only evidence.
  • Local supervisor, bounded scenario processes, revision checks, protected contract/configuration files, required-check coverage, and an agent-neutral 0/1/2 gate.
  • Claude Code hook configuration, agent instructions, a runnable example, a no-LLM protocol demo, a reproducible live-agent recorder with visual evidence, and an explicit tests/CI comparison.
  • The existing OTLP/HTTP watcher and stock collector integration remain compatible foundations. Broader service monitoring is expansion rather than the primary adoption workflow.
  • Installable wheel/sdist, locked developer tooling, Apache-2.0 licensing, CI and separate OIDC Trusted Publishing.

Validation

  • make ci: 98 tests pass, 95.3% coverage including subprocesses; schema generation, Ruff and strict mypy pass.
  • Real-process tests cover automatic edit detection, missing instrumentation, predicate substitution, omitted targets, suppression, rapid same-size edits, stale runs, protected inputs, timeout cleanup, process death, and exclusive session ownership.
  • make demo: healthy → drift → deny progression/completion → permit repair → healthy → stopped supervisor reports incomplete.
  • Wheel/sdist metadata and contents pass; rebuilding the sdist reproduces the wheel. The complete local-session demo also passes from an externally installed wheel.
  • The installed wheel's session demo passes on Python 3.11 with minimum OTel 1.25.0 dependencies.
  • All eight GitHub checks pass on 58abe49: Linux Python 3.11–3.14, macOS Python 3.11/3.14, the stock collector integration, and version guard. CI run.
  • Real Claude Code 2.1.284 repair run: a deliberately seeded pricing defect triggers two failed evaluations; the actual PreToolUse hook denies Bash, Claude repairs the implementation in one Edit, and Stop accepts completion after 15 evaluations pass. Five reviewed files remain unchanged. The recorded walkthrough and evidence include the visible transcript, hook log, source snapshots, screenshot, and commands to reproduce. The report explicitly notes the untested semantics of integer coercion introduced by the repair.

Scope and release readiness

This is a cooperative local development guardrail for macOS/Linux. It checks reviewed executable claims on exercised inputs; it does not infer arbitrary intent, interrupt unfinished model tokens, guarantee absence of all AI slop, or sandbox generated code. Weak predicates remain weak. Enabled synchronous hooks and a controller that honors the gate are necessary.

The original <3% overhead target versus a bare OTel span remains unmet. ADR-0007 separates equivalent-work wrapper overhead from declaration telemetry cost; no unsupported performance or review-time savings are claimed.

No merge, release tag, or registry upload has been performed. The owner must reserve/confirm melampus and configure the exact pending Trusted Publishers described in docs/RELEASE.md. Publishing remains a separate OIDC workflow.

@github-actions

Copy link
Copy Markdown

Release version guard

✅ Version bump looks correct.

0.0.0 → 0.1.0

  • declared bump: minor
  • ✅ version increment and changelog entry are consistent

@melampus-admin
melampus-admin marked this pull request as ready for review September 28, 2026 07:48
@melampus-admin melampus-admin changed the title feat: prepare 0.1.0 runtime contract SDK and watcher feat: prepare 0.1.0 local AI coding-session drift and repair loop Sep 28, 2026
@melampus-admin
melampus-admin merged commit 9518b44 into main Sep 29, 2026
8 checks passed
@melampus-admin
melampus-admin deleted the feat/first-release branch September 29, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant